//#include "numutils.h"

//#include  <iostream>
//#include <stdio.h>
//#include "numutils.h"
//#include  <string>   // C++ strings                                   

//#include  <gsl/gsl_errno.h>// header for gsl error handling
//#include  <gsl/gsl_spline.h>// header for gsl splining routines 


/////////////////////////
// Basic Usage example //
/////////////////////////
// #include  <iomanip>     // manipulators like setprecision
// #include  <cmath>
// #include  <cstring>     // C++ strings                                 
// using  namespace std;    

// inline  double sqr ( double  z) 
// { return z*z;}  // inline function for z^2

// int test_spline (void )
// {   
//   const int  NMAX = 300;   
//   // maximum number of array points 
//   double  x_values[NMAX], y_values[NMAX];
//   // Test: interpolate y = sin(x^2) from 0 to 2 with 20 points  
//   double  xmin = 1.;
//   double  xmax = 3.;
//   int  npts = 20;
//   double deltax = (xmax - xmin)/double (npts-1);

//   for  (int  i = 0; i < npts; i++)
//   {    
//     double x_temp = double (i) * deltax; // grid of x points
//     x_values[i] = x_temp;    
//     y_values[i] = sin (x_temp * x_temp);  
//   }   
//   // Make the spline object  
//   string type = "cubic ";
//   CSpline my_cubic_spline (x_values, y_values, npts, type);  
//   double x;
//   cout << "Enter x:  ";
//   cin >> x;     // test point 
//   // Evaluate the spline and derivatives  
//   double  y = my_cubic_spline.y (x);
//   double  y_deriv = my_cubic_spline.yp (x);
//   double  y_deriv2 = my_cubic_spline.ypp (x);
//   double  x_sq = sqr(x);
//   std::cout << "    x     y_exact   y_spline   y'_exact  y'_spline";
//   std::cout << "   y''_exact  y''_spline" << endl;
//   std::cout << std::fixed << std::setprecision(6)        
// 	    << x << "  " << sin(x_sq) << "  " <<  y << "   "
//        <<  2.*x*cos(x_sq) << "   " << y_deriv << "   "
//        <<  -4.*x_sq* sin(x_sq) + 2.*cos(x_sq) << "   " <<  y_deriv2
//        << endl;  
// return(0);      
// // successful completion 
// }



